package com.wlz.jmm;

import java.util.ArrayList;

/**
 *   堆溢出
 *
 */
public class HeapTest {

    byte[] bytes = new byte[1024*100]; // 100k

    public static void main(String[] args) throws InterruptedException {
        ArrayList<HeapTest> heapTests = new ArrayList<HeapTest>();

        while (true) {
            heapTests.add(new HeapTest());
            Thread.sleep(10);
        }
    }
}
